{template 'public/header'}
<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun/template/public/ygcss.css">
<style type="text/css">
    input[type="radio"] + label::before {
        content: "\a0"; /*不换行空格*/
        display: inline-block;
        vertical-align: middle;
        font-size: 16px;
        width: 1em;
        height: 1em;
        margin-right: .4em;
        border-radius: 50%;
        border: 2px solid #ddd;
        text-indent: .15em;
        line-height: 1;
    }

    input[type="radio"]:checked + label::before {
        background-color: #444444;
        background-clip: content-box;
        padding: .1em;
        border: 2px solid #444444;
    }

    input[type="radio"] {
        position: absolute;
        clip: rect(0, 0, 0, 0);
    }

    .ismap .maps {
        height: 380px;
        width: 550px;
        overflow: hidden;
        border: 1px solid #E4E4E4;
    }
</style>

<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">门店信息</a></li>
</ul>

<div class="main">
    <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
        <!--<input type="hidden" name="parentid" value="{$parent['id']}" />-->
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                商家设置
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <label  class="col-sm-2 control-label">是否开启入驻申请</label>
                    <div class="col-sm-10">
                        <label class="radio-inline">
                            <input  type="radio" name="is_open_apply" id="is_open_apply0" value="0" title="关闭" {if $item['is_open_apply']==0}checked{/if} />
                            <label for="is_open_apply0" >关闭</label>
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="is_open_apply" id="is_open_apply1" value="1" title="开启" {if $item['is_open_apply'] ==1}checked{/if} />
                            <label for="is_open_apply1" >开启</label>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label  class="col-sm-2 control-label">是否收取入驻费用</label>
                    <div class="col-sm-10">
                        <label class="radio-inline">
                            <input onchange="check(this)" id="is_fee0" type="radio" name="is_fee" value="0" {if $item['is_fee']==0}checked{/if} />
                            <label for="is_fee0">关闭</label>
                        </label>
                        <label class="radio-inline">
                            <input onchange="check(this)" id="is_fee1" type="radio"  name="is_fee" value="1" {if $item['is_fee']==1}checked{/if} />
                            <label for="is_fee1">开启</label>
                        </label>
                        <div class="help-block">开启入驻费用时，商家在完善资料后需要支付入驻费用</div>
                    </div>
                </div>
                <div class="form-group" id="amount" style="display: {if $item['is_fee']==1}block{else}none{/if}">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">入驻费用</label>
                    <div class="col-sm-4">
                        <p class="input-group" style="margin-bottom: 0px;">
                            <input type="text" name="amount" value="{$item['amount']}" class="form-control"
                                   style="width: 390px;"/>
                        </p>
                        <div class="help-block">设置入驻金额</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">平台手续费%</label>
                    <div class="col-sm-4">
                        <p class="input-group" style="margin-bottom: 0px;">
                            <input type="text" name="trade_amount" value="{$item['trade_amount']}" class="form-control"
                                   style="width: 390px;"/>
                        </p>
                        <div class="help-block">最大不能超过100，按百分比计算</div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">入驻规则</label>
                <div class="col-sm-9">
                    {php echo tpl_ueditor('content',$item['content']);}
                </div>
            </div>
        </div>

        <div class="form-group">
            <input type="submit" name="submit" value="提交" class="btn col-lg-3"
                   style="color: white;background-color: #444444;margin-left: 550px;"/>
            <input type="hidden" name="token" value="{$_W['token']}"/>
            <input type="hidden" name="id" value="{$item['id']}"/>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $("#frame-16").show();
        $("#yframe-16").addClass("wyactive");
    })
    function check() {
        var a= $('input[name="is_fee"]:checked').val()
        if(a==1){
            $('#amount') .show();
        }else{
            $('#amount') .hide();
        }
    }
</script>